package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class MethodSpecificationDesignatorSubtype2 implements MethodSpecificationDesignator {

    private int beginIndex;
    private int endIndex;
    private boolean instance;
    private boolean static_;
    private boolean constructor;
    private Identifier methodName;
    private SqlParameterDeclarationList sqlParameterDeclarationList;
    private ReturnsClause returnsClause;
    private SchemaQualifiedName schemaResolvedUserDefinedTypeName;

    public MethodSpecificationDesignatorSubtype2(int beginIndex,
                                                 boolean instance,
                                                 boolean static_,
                                                 boolean constructor,
                                                 Identifier methodName,
                                                 SqlParameterDeclarationList sqlParameterDeclarationList,
                                                 ReturnsClause returnsClause,
                                                 SchemaQualifiedName schemaResolvedUserDefinedTypeName) {
        this.beginIndex = beginIndex;
        this.endIndex = schemaResolvedUserDefinedTypeName.getEndIndex();
        this.instance = instance;
        this.static_ = static_;
        this.constructor = constructor;
        this.methodName = methodName;
        this.sqlParameterDeclarationList = sqlParameterDeclarationList;
        this.returnsClause = returnsClause;
        this.schemaResolvedUserDefinedTypeName = schemaResolvedUserDefinedTypeName;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public boolean isInstance() {
        return instance;
    }

    public boolean isStatic() {
        return static_;
    }

    public boolean isConstructor() {
        return constructor;
    }

    public Identifier getMethodName() {
        return methodName;
    }

    public SqlParameterDeclarationList getSqlParameterDeclarationList() {
        return sqlParameterDeclarationList;
    }

    public ReturnsClause getReturnsClause() {
        return returnsClause;
    }

    public SchemaQualifiedName getSchemaResolvedUserDefinedTypeName() {
        return schemaResolvedUserDefinedTypeName;
    }

}
